﻿@using DCMS.Web.Framework.UI;
@using DCMS.Web.Framework;


@using DCMS.Core.Domain.Common;
@using DCMS.ViewModel.Models.Sales;

@model DispatchBillModel

<input asp-for="Id" type="hidden" />

@if (!ViewData.ModelState.IsValid)
{
    <div class="alert alert-warning alert-dismissable mt10">
        <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
        <div asp-validation-summary="All"></div>
    </div>
}

@if (Model.AuditedStatus || Model.ReversedStatus)
{
    @await Html.PartialAsync("_Watermark")

}
<div class="row">

    <div class="col-lg-12">
        <form id="formSearch" class="form-horizontal" novalidate="novalidate">
            <div class="form-group mb10">

                <div class="col-sm-2">
                    <dcms-select asp-for="DeliveryUserId" asp-items="@Model.DeliveryUsers" class="form-control" asp-disabled="@(Model.AuditedStatus)" />
                </div>

                <div class="col-sm-2">
                    <dcms-select asp-for="CarId" asp-items="@Model.Cars" class="form-control" asp-disabled="@(Model.AuditedStatus)" />
                </div>

            </div>

        </form>
    </div>
</div>


@if (Model.Id != 0 && !string.IsNullOrEmpty(@Model.BillBarCode))
{
    <div class="row mtn mb10">
        <div class="col-md-3 pt20">
            <div class="form-group mbn">
                <lable class="col-lg-3 control-label">单据编号：</lable>
                <div class="col-lg-9">
                    <input asp-for="BillNumber" class="form-control-bb input-sm pbn pln prn" readonly="readonly" />
                </div>
            </div>
        </div>
        <div class="col-md-3 pt20">
            <div class="form-group mbn">
                <lable class="col-lg-3 control-label">制单：</lable>
                <div class="col-lg-9">
                    <input asp-for="MakeUserName" class="form-control-bb input-sm pbn pln prn" readonly="readonly" />
                </div>
            </div>
        </div>
        <div class="col-md-3 pt20">
            <div class="form-group mbn">
                <lable class="col-lg-3 control-label">审核：</lable>
                <div class="col-lg-9">
                    <input asp-for="AuditedUserName" class="form-control-bb input-sm pbn pln prn" readonly="readonly" />
                </div>
            </div>
        </div>
        <div class="col-md-3">
            <img class="media-object mn thumbnail pull-right" src="@Model.BillBarCode" />
        </div>
    </div>
}

<div class="row mt10 mb10">
    <div class="col-md-12">
        <table class="table table-striped table-bordered table-hover" id="DispatchItems"></table>
    </div>
</div>

